package com.star.message.api.service;

import com.star.message.api.contract.command.SendSmsCommand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 短信服务
 *
 * @author zhouhengzhe
 * @version 1.0
 * @date 2023/11/28 18:05
 */
@FeignClient(name = "message-service", contextId = "MessageSmsApi", path = "/message/sms/api")
public interface MessageSmsApi {
    /**
     * 发送短信
     *
     * @param sendSmsCommand 短信发送命令
     */
    @PostMapping("/sendSms")
    void sendSms(@RequestBody @Validated SendSmsCommand sendSmsCommand);

}
